import time
from gen120 import generate_triangle
from alg120 import Solution

def run_test():
    triangle = generate_triangle(levels=5, value_range=(1, 20))
    print("测试用例（三角形）：")
    for row in triangle:
        print(row)

    solver = Solution()
    start = time.time()
    result = solver.minimumTotal(triangle)
    end = time.time()

    print("最小路径和：", result)
    print("运行时间：%.6f 秒" % (end - start))

if __name__ == "__main__":
    run_test()
